<template>
  <view class="contanin">
    <rich-text :nodes="about_us" style="color: #ffffff"></rich-text>
    <!-- <parser :html="about_us"></parser> -->
    <!-- <text>231321321</text> -->
  </view>
</template>

<script>
import api from "../../api/api";
export default {
  data() {
    return {
      about_us: "",
      key: "",
      title: "",
    };
  },
  onLoad(option) {
    console.log(option, "sadsadasdsadasad");
    if (option != "") {
      this.key = option.key;
    } else {
      this.key = "about_us";
    }
    if (this.key == "about_us") {
      this.title = "关于我们";
    } else {
      this.title = "";
    }

    this.getAgreement();
  },
  methods: {
    async getAgreement() {
      let res = await api.getabout({
        method: "get",
        loading: "加载中",
        query: {
          key: this.key,
        },
      });
      if (res.code == 0) {
        console.log(res);
        this.about_us = res.data.value;
      }
    },
  },
};
</script>

<style lang="scss" scoped>
@import "../../style/yuanchuang.scss";
.contanin {
  background-color: $bg-color1;
  min-height: 100vh;
  padding: 30rpx;
}
</style>
